package com.originskyseed.platform.user.service;

import java.util.List;
import java.util.Map;

import com.originskyseed.platform.core.base.BasePage;
import com.originskyseed.platform.user.model.AnchorGroup;

/**
 * 分组信息表Service接口类（OSI_GROUP）
 *
 * @author WuZhuoXi
 */
public interface IAnchorGroupService {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(AnchorGroup record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(AnchorGroup record) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(AnchorGroup record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(AnchorGroup record) throws Exception;

	/**
	 * 更新置顶信息
	 *
	 * @param anchorGroup
	 * @return
	 * @throws Exception
	 */
	public int updateIsTop(AnchorGroup anchorGroup) throws Exception;

	/**
	 * 更新排序信息
	 *
	 * @param downAnchorGroup
	 * @param upAnchorGroup
	 * @return
	 * @throws Exception
	 */
	public int updatePrority(AnchorGroup downAnchorGroup, AnchorGroup upAnchorGroup) throws Exception;

	/**
	 * 根据优先级查询分组
	 * 
	 * @return
	 * @throws Exception
	 */
	public AnchorGroup selectGroupByPrority(Integer prority) throws Exception;

	/**
	 * 查询最大优先级
	 * 
	 * @return
	 * @throws Exception
	 */
	public Integer selectPrority() throws Exception;

	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public AnchorGroup selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<AnchorGroup> selectList(AnchorGroup record) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<AnchorGroup> selectListByPage(Map<String, Object> params, BasePage<AnchorGroup> page) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertGroup(AnchorGroup record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateGroup(AnchorGroup record) throws Exception;
}
